<template>
    <el-header>
        <div class="l-content">
            <el-button size="small">
                <el-icon :size="20">
                    <Menu />
                </el-icon>
            </el-button>
        </div>
        <div class="r-content"><button @click="edit">退出登录</button></div>
    </el-header>
</template>

<script setup lang='ts'>
import { useRouter } from 'vue-router';
import { useStore } from '@/stores';
const store = useStore()
const router = useRouter()
const edit = () => {
    store.clearToken()
    console.log(localStorage.getItem('token'));
    console.log(localStorage.getItem('dynamic_routes'));
    console.log(router.getRoutes());


    router.push({
        name: 'login'
    })
}
</script>

<style scoped lang="less"></style>